#@adminLayout()
#define main()
<div class="card">
    #@cardAddOrEdit("账户管理 / "+(model?"修改":"新增"),"sys/account")
    #if(model)
    <div class="card profile">
        <div class="profile__img" style="width: 200px;height: 200px;">
            #if(model.avatar==null)
            <img class="user_head" src="/upload/avatar/x.jpg" alt="">
            <p style="margin-left: 30px;margin-top: 30px;font-size: 16px;color: red;">暂无头像,请上传</p>
            #else
            <img class="user_head" src="/upload/avatar#(model.avatar??)" alt="">
            #end
            #permission("/admin/sys/account/avatar")
            <a data-pjax href="/admin/sys/account/avatar?id=#(model.id??)&p=#(p)&s=#(s)"
               class="zmdi zmdi-camera profile__img__edit"></a>
            #end
        </div>
        <div class="profile__info">
            <ul class="icon-list">
                <li><i class="zmdi zmdi-account-circle zmdi-hc-fw"></i>#(model.fullName??)</li>
                <li><i class="zmdi zmdi-email"></i> #(model.email??)</li>
                <li><i class="zmdi zmdi zmdi-phone"></i> #(model.mobile??)</li>
                <li style="color: red;">若图片更新成功，没有展示新的图片，请安ctrl+F5强制刷新一下即可</li>
            </ul>
        </div>
    </div>
    #end
</div>
<script type="text/javascript">
    $('.profile__img>.user_head').attr("src", "/upload/avatar/#(model.avatar??)?" + Math.random());
    $('.user__name').html("#(loginAccount.fullName)");
</script>
#end
#define cardCol()
<input type="hidden" name="account.id" value="#(model.id??)">
#if(!model)
<input type="hidden" name="account.password" value="Aa111111">
<input type="hidden" name="account.status" value="1">
#end
<div class="col-sm-6">
    <div class="form-group">
        <lable>企业</lable>
        <select name="account.eId" class="select2">
            #for(x:enterpriseList)
            <option value="#(x.id)">#(x.name)</option>
            #end
        </select>
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>登录名</lable>
        <input type="text" class="form-control" name="account.userName" value="#(model.userName??)"
               placeholder="请输入昵称">
        <i class="form-group__bar"></i>
    </div>
</div>


<div class="col-sm-6">
    <div class="form-group">
        <label>姓名</label>
        <input type="text" class="form-control" name="account.fullName" value="#(model.fullName??)"
               placeholder="请输入姓名">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <label>手机号码</label>
        <input type="text" class="form-control" maxlength="11" minlength="11" name="account.mobile"
               value="#(model.mobile??)"
               placeholder="请输入手机号">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <label>邮箱</label>
        <input type="text" class="form-control" name="account.email"
               value="#(model.email??)"
               placeholder="请输入邮箱">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group form-group--select">
        <label>性别</label>
        <div class="select">
            <select class="form-control" name="account.sex">
                <option value="0" #if(model.sex??== 0) selected #end>男</option>
                <option value="1" #if(model.sex??== 1) selected #end>女</option>
                <option value="-1" #if(model.sex??== -1) selected #end>性别未知</option>
            </select>
        </div>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group form-group--select">
        <label class="text-danger">#(model==null?"账户初始密码：Aa111111":"")</label>
    </div>
</div>
#end
